package com.xci.edu.core.configuration;

import com.xci.edu.core.service.EduWebHelpService;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;

import javax.annotation.Resource;

/**
 * 全局注入变量到Web页面中
 */
@ControllerAdvice
public class EduWebHelpController {
    @Resource private EduWebHelpService eduWebHelpService;

    @ModelAttribute("eduWebHelp")
    public EduWebHelpService initEduWebHelpService() {
        return this.eduWebHelpService;
    }
}